package com.example.dql.diary.activity;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.dql.diary.Model.ImageDTO;
import com.example.dql.diary.R;

import java.util.List;

/**
 * Created by dql on 2018/3/22.
 */

public class RecycleAdapter extends BaseQuickAdapter<ImageDTO,BaseViewHolder> {
    public RecycleAdapter(@Nullable List<ImageDTO> data) {
        super(R.layout.item_recycle,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ImageDTO item) {
        ImageView imageView = helper.getView(R.id.recycle_img);
        Glide.with(mContext)
                .load(item.getImg())
                .into(imageView);
    }
}
